package org.springblade.modules.material.context;

import org.springblade.modules.material.entity.PaperAnswerEntity;
import org.springblade.modules.material.entity.PaperAnswerOptionEntity;
import org.springblade.modules.material.strategy.CalculateScoreStrategy;
import org.springblade.modules.material.vo.PaperAnswerVO;
import org.springblade.modules.material.vo.PaperDetailsRelatedVO;
import org.springblade.modules.material.vo.PaperReleaseDetailVO;

import java.util.List;

/**
 * @Description: 计算分数的上下文
 */
public class CalculateScoreContext {

	private CalculateScoreStrategy strategy;

	public CalculateScoreContext(CalculateScoreStrategy strategy) {
		this.strategy = strategy;
	}

	public Integer executeStrategy(List<PaperReleaseDetailVO> paperReleaseDetailVOList,
								   List<PaperAnswerOptionEntity> paperAnswerOptionEntityList,Long  paperAnswerId,Integer multipleScoreSetting ) {
		return strategy.calculateScore(paperReleaseDetailVOList,paperAnswerOptionEntityList,paperAnswerId,multipleScoreSetting);
	}

}
